layui.use('upload', function(){
    var upload = layui.upload;
    upload.render({
        elem: '#import',
        url: '/excel/importExcel',
        method: "post",
        field: 'file',
        exts: 'xls|xlsx',
        accept: 'file',
        done: function(res, index, upload){
            var layer = parent.layer;
            layer.close(layer.index);
            parent.layer.msg('导入成功');
        },
        error:function(index){
            var layer = parent.layer;
            layer.close(layer.index);
            parent.layer.msg('导入失败');
        }
    })
});